import { getdetail } from "../../utils/api";
import { getdetailmain } from "../../utils/api";
const detail = {
  state() {
    return {
      getdetaillist: "",
      getdetailcontent: "",
    };
  },
  mutations: {
    getdetail(state, payload) {
      state.getdetaillist = payload;
    },
    getdetailmain(state, payload) {
      state.getdetailcontent = payload;
    },
  },
  actions: {
    async getdetail({ commit }) {
      const res = await getdetail();
      commit("getdetail", res.result);
    },
    async getdetailmain({ commit }, payload) {
      const res = await getdetailmain(payload);
      commit("getdetailmain", res.result);
    },
  },
};
export default detail;
